package com.example.demo.study.designmode.creational.singleton;
import org.junit.Assert;


public class Hungry {
    private static final Hungry instance=new Hungry();
    public Hungry(){}
    public static Hungry getInstance()
    {
        return instance;
    }

    public static void main(String[] args) {
        Hungry h1=Hungry.getInstance();
        Hungry h2=Hungry.getInstance();
        Assert.assertEquals(h2,h1);
    }
}
